package com.dongdongsongcan.app.control;

import com.alibaba.fastjson.JSON;
import com.dongdongsongcan.app.control.bean.AreaData;
import com.dongdongsongcan.app.control.bean.OrderDetailData;
import com.dongdongsongcan.app.control.bean.OrderListData;
import com.dongdongsongcan.app.control.bean.OrderSubmitData;
import com.dongdongsongcan.app.control.bean.ShopData;
import com.dongdongsongcan.app.model.api.WebServiceApi;
import com.su.dolphin.control.bean.BaseBean;
import com.su.dolphin.control.task.CtrlTask;

/**
 * Created by Administrator on 2015/12/7 0007.
 */
public class SearchControl {

    public static void search(final String keyword, CtrlTask.IControlResponse<AreaData> response) {
        CtrlTask.submitTask(new CtrlTask.IControlWork() {
            @Override
            public BaseBean doWork() {
                return WebServiceApi.search(keyword);
            }
        }, response);
    }

    public static void searchshop(final String keyword, CtrlTask.IControlResponse<ShopData> response) {
        CtrlTask.submitTask(new CtrlTask.IControlWork() {
            @Override
            public BaseBean doWork() {
                return WebServiceApi.searchshop(keyword);
            }
        }, response);
    }
}
